package com.AJava1710D.设计模式.责任链模式;

import javax.servlet.Filter;

/**
 * 作者: LCG
 * 日期: 2020/6/30 08:39
 * 描述:
 */
public class ChainInterfaceImpl extends ChainAbstruct implements ChainInterface {

    private String name;

    public ChainInterfaceImpl(String name) {
        this.name = name;
    }

    @Override
    public void test() {
        System.out.println("================"+name);
        if(getChainInterface()!=null){
            getChainInterface().test();
        }
    }
}
